/**
 * 
 */
package com.ztesoft.web.baseconfig.service;

import java.math.*;
import java.util.*;

import com.ztesoft.core.common.Page;
import com.ztesoft.framework.exception.BaseAppException;
import com.ztesoft.web.baseconfig.db.po.SubTableDefinePO;
import com.ztesoft.web.baseconfig.db.po.TableNamePO;

/**
 * <Description> <br>
 * 
 * @author codeCreater<br>
 * @version 1.0<br>
 * @taskId <br>
 * @CreateDate 2014年11月11日 <br>
 * @since V1.0<br>
 * @see com.ztesoft.web.baseconfig.service <br>
 */

public interface ISubTableDefineService {

	/**
	 * 根据数据ID获取分表定义，分表、目标表
	 * 
	 * @param po
	 * @return
	 */
	List<TableNamePO> selectBySourceDataIdForSubAndTgt(String tableName, SubTableDefinePO po) throws BaseAppException;

	/**
	 * 根据数据ID获取分表定义，主源表
	 * 
	 * @param po
	 * @return
	 */
	List<TableNamePO> selectBySourceDataIdForSrc(String tableName, SubTableDefinePO po) throws BaseAppException;

	SubTableDefinePO selectByPrimaryKey(Integer key) throws BaseAppException;

	List<SubTableDefinePO> selectByArg(SubTableDefinePO record) throws BaseAppException;

	List<SubTableDefinePO> selectBySourceDataId(SubTableDefinePO record) throws BaseAppException;

	Page<SubTableDefinePO> selectByArgAndPage(SubTableDefinePO record, Page<SubTableDefinePO> resultPage)
			throws BaseAppException;

	int addForDraft(SubTableDefinePO record) throws BaseAppException;

	SubTableDefinePO add(SubTableDefinePO record) throws BaseAppException;

	int update(SubTableDefinePO record) throws BaseAppException;

	int delete(SubTableDefinePO record) throws BaseAppException;

}
